/* eslint-disable */
import { request, METHOD } from '@/utils/request';
// 获取航段事件列表
export const getEventListApi = (params) => {
  return request('/ftm/ftmEventLeg/getEventList', METHOD.POST, params);
};
// 根据机号获取航段事件详细信息
export const getEventDetailByTailNumberApi = (params) => {
  return request('/ftm/ftmEventLeg/getEventDetailByTailNumber', METHOD.GET, params);
};
// 事件添加评论
export const addCommentApi = (params) => {
  return request('/ftm/ftmEventLeg/addComment', METHOD.POST, params);
};
// 导出
export const processingExportExcelApi = (params) => {
  return request('/ftm/processing/processingExportExcel', METHOD.POST, params, { responseType: 'blob' });
};

// 上传
export const uploadApi = (params) => {
  return request(`/minio/upload?eventId=${params.eventId}`, METHOD.POST, params.formData);
};

// 下载
export const downloadApi = (params) => {
  return request('/minio/download', METHOD.GET, params, { responseType: 'blob' });
};

// 事件文件删除
export const removeFileApi = (params) => {
  return request('/minio/removeFile', METHOD.GET, params);
};

// 斜率
export const getEventBySlopeApi = (params) => {
  return request('/ftm/ftmEventLeg/getEventBySlope', METHOD.GET, params);
};

// 获取全量机场列表
export const getListAirportAllApi = () => {
  return request('/ftm/ftmAirport/listAirportAll', METHOD.GET);
};

// 获取管控状态
export const getControlState = () => {
  return request('/ftm/ftmType/queryStatus', METHOD.GET);
};
// 保存管控状态日志
export const saveControlStateLog = (params) => {
  return request('/ftm/ftmType/saveControlStateLog', METHOD.POST, params);
};
// 获取管控状态日志
export const getControlStateLog = (params) => {
  return request('/ftm/ftmType/getControlStateLog', METHOD.POST, params);
};
// 获取FIM手册及链接
export const getHandbookFIM = (params) => {
  return request('/ftm/ftmType/getHandbookFIM', METHOD.POST, params);
};
// 获取状态历史
export const getStateHistory = (params) => {
  return request('/ftm/event/deal/queryHistory', METHOD.GET, params);
};